package com.arpa.wms.mapper;

import com.arpa.wms.domain.entity.GoodsType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: Allen chen
 * @Date 2020/8/15
 * @Description:
 */
public interface GoodsTypeMapper extends BaseMapper<GoodsType> {

    List<GoodsType> queryList(GoodsType goodsType);

    List<GoodsType> getByCodeOrParentCode(@Param("code") String code,@Param("shipmentCode") String shipmentCode);

    GoodsType queryOneByName(GoodsType goodsType);

    GoodsType queryOneByTypeCode(GoodsType goodsType);

    int delGoodsTypeWithChild(GoodsType goodsType);

    List<GoodsType> getGoodsTypeWithChild(GoodsType goodsType);

    List<GoodsType> getListByCodes(List<String> list);

    /**
     * 执行原生sql
     * @param sql
     * @return
     */
    int execSql(@Param("sql") String sql);

}
